//
//  YJDImageView.m
//  tucici
//
//  Created by tucici on 2017/11/26.
//  Copyright © 2017年 tucici. All rights reserved.
//

#import "YJDImageView.h"
#import "NSString+category.h"
@implementation YJDImageView
- (instancetype)initWithImageName:(NSString *)imageName
{
    self = [super init];
    if (self)
    {
        self.imageName = imageName;
    }
    return self;
}

- (void)setImageName:(NSString *)imageName
{
    
    if (!imageName || [imageName length] < 1)
    {
        return;
    }
    if (_imageName != imageName)
    {
        _imageName = imageName;
        self.image = [_imageName yjd_image];
    }
}
/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */

@end
